package com.tiny_wind.resource_manager.model;

public class TwPageModel {
	/**
	 * 从0开始的页数
	 */
	public int currentPage;

	/**
	 * 一页的数据量
	 */
	public int pageSize;
	/**
	 * 数据总量
	 */
	public int totalCount;
	/**
	 * 是否还有后续数据
	 */
	public boolean hasMore;

	TwPageModel(int onePageSize) {
		this.currentPage = 0;
		this.pageSize = onePageSize;
		this.totalCount = onePageSize;
		this.hasMore = false;
	}
	
	public TwPageModel(int currentPage, int pageSize, int totalCount) {
		this.currentPage = currentPage;
		this.pageSize = pageSize;
		this.totalCount = totalCount;
		if((currentPage+1) * pageSize >= totalCount) {
			this.hasMore = false;
		}
		else {
			this.hasMore = true;
		}
	}
}
